package com.avecsys.quotemanager.service.supplier;

import java.util.List;

import com.avecsys.quotemanager.exception.BusinessException;
import com.avecsys.quotemanager.pojos.SupplierMasterPojo;
import com.avecsys.quotemanager.pojos.SupplierUsersPojo;
import com.avecsys.quotemanager.utils.TransactionStatus;
import com.avecsys.quotemanager.vo.SupplierVO;

/**
 * 
 * @author Sam Sundar K
 * 
 */
public interface SupplierMasterService {

	/**
	 * Method to save the supplier master information
	 * 
	 * @param supplierVO
	 * @return Integer
	 * @throws BusinessException
	 */
	public abstract TransactionStatus saveSupplierMaster(SupplierVO supplierVO)
			throws BusinessException;

	/**
	 * Method to return all the suppliers
	 * 
	 * @return List<SupplierMasterPojo>
	 */
	public abstract List<SupplierMasterPojo> getAllSuppliers()
			throws BusinessException;

	/**
	 * Method to delete the supplier master information
	 * 
	 * @param supplierMasterPojo
	 * @return TransactionStatus
	 * @throws BusinessException
	 */
	public TransactionStatus deleteSupplierMaster(
			SupplierMasterPojo supplierMasterPojo) throws BusinessException;

	/**
	 * Method to get the supplier master information by supplier id
	 * 
	 * @param supplierId
	 * @return SupplierMasterPojo instance
	 * @throws BusinessException
	 */
	public SupplierMasterPojo getSupplierMasterById(Long supplierId)
			throws BusinessException;

	/**
	 * 
	 * @param supplierMasterPojo
	 * @return List<SupplierUsersPojo>
	 * @throws BusinessException
	 */
	public abstract List<SupplierUsersPojo> getAllUsers(
			SupplierMasterPojo supplierMasterPojo) throws BusinessException;

	/**
	 * Method to verify the supplier email is not registered with another
	 * supplier
	 * 
	 * @param supplierVO
	 * @param email
	 * @return boolean
	 * @throws BusinessException
	 */
	public boolean isSupplierEmailNotRegistered(SupplierVO supplierVO)
			throws BusinessException;
}
